home *** CD-ROM | disk | FTP | other *** search
-
- -- GRIPPLE --
-
- "Gripple" is Completely-Free-And-How-Could-It-Be-Otherwise Ware.
-
- This is my first program for the IBM as well as my first bigger-than-seven-
- lines program in C. It's based on a little pocket game of the same name
- by a company called M-Squared Incorporated. I liked the pocket game very
- much, but I found that the pieces were difficult to rotate and sometimes
- even popped off! The computer version is a solution to that, although
- I'm aware that the awkwardness of the pocket game is half the fun.
-
- You will see a shuffled board of pegs when you run the program. There
- should be four each of red, yellow, blue, and green pegs. The object is
- to rotate regions of the board until the arrangement is such that the
- various colors are isolated in the four quadrants. In other words, your
- goal is an arrangement like this:
-
- Y Y G G B B R R
- Y Y G G B B R R
- R R B B ...or like this: Y Y G G ...and so on.
- R R B B Y Y G G
-
- Select a region of the board to rotate by hitting a number key from 1 to
- 5. You can rotate each of the four quadrants (1 through 4) or the four
- center pegs (5). Use the left and right arrow keys to rotate the selected
- region counterclockwise and clockwise, respectively. Press control-R to
- reshuffle the pegs, and ESC to exit the program.
-
- Your score appears in the upper-right corner of the screen. It is the
- number of rotations you've made since the last reshuffling.
-
- Please leave comments to DougB5 on America Online (the online service
- of champs.) I'm just getting started in C, and I'd really appreciate
- comments from C enthusiasts on my code's efficiency or lack thereof.
-
- Program was compiled with Turbo C++ 1.0, Copyright (C) 1990 by Borland
- International.
-
-
- Doug B.